// 合约 abi 文件
import contract_abi from '@/contract/ArtStore.json'
import Web3 from 'web3'
import {
    getMatemask
} from '@/utils/matemask'
// var web3 = new Web3(new Web3.providers.WebsocketProvider('ws://localhost:8545'))

function getAbi() {
    return new Promise((resolve, reject) => {
        getMatemask().then(web3 => {
            let abi = new web3.eth.Contract(contract_abi, "0xc2329CF8Cb7dea2Acb74e4cF7893884EFC96024E")
            resolve(abi)
        }).catch(err => {
            reject(err)
        })
    })
}
export default getAbi